function [errors, Y] = test_one_reduction(X, method, dimensionality)
  [Y, M] = compute_mapping(X, method, dimensionality);
  
  [foo, Xni] = find_nn(X, 10);
  [foo, Yni] = find_nn(Y, 10);
  
  errors = 0;
  
  for i = 1:size(Xni)(1)
    errors += size(setdiff(Xni(i,:), Yni(i,:)))(2) / 20;
  end
  
  errors = errors / size(Xni)(1);
